package com.example.logdemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class LogActivity extends AppCompatActivity {

    private static final String TAG = "LogActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.log_layout);

        Button bt = (Button) findViewById(R.id.bt);
        bt.setOnClickListener( new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Log.v(TAG, "This is a Verbose.");
                Log.d(TAG, "This is Debug.");
                Log.i(TAG, "This is Information");
                Log.w(TAG, "This is Warning.");
                Log.e(TAG, "This is Error." );
            }
        });

    }
}
